package com.dayu.mybatis_plus.entity;



import com.baomidou.mybatisplus.annotation.*;
import com.dayu.mybatis_plus.Enums.EnumStatus;
import lombok.Data;
import lombok.ToString;

import java.util.Date;
@ToString
@Data
@TableName(value = "user")
public class User {
    @TableId(value = "id",type = IdType.INPUT)
    private Long id;
    @TableField(value = "name",select = false)//表示不查这个东西
    private String name;
    private Integer age;
    @TableField(exist = true)//表示不是数据库字段
    private String email;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @Version
    private Integer version;
    @TableField(value = "status")
    private EnumStatus status;
    @TableLogic
    private Integer isDel;

}
